home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Online / SpeakFreely / src / lpc / lpc.h < prev    next >
C/C++ Source or Header  |  2000-05-18  |  776b  |  36 lines

  1. /*
  2.  * LPC subroutine declarations
  3.  */
  4. #define LPC_FILTORDER        10
  5.  
  6. #define FRAMESIZE   160
  7.  
  8. #ifdef OLDCC
  9. #define signed
  10. #define const
  11. #endif
  12.  
  13. typedef struct {
  14.     unsigned short period;
  15.     unsigned char gain;
  16.     char pad;
  17.     signed char k[LPC_FILTORDER];
  18. } lpcparams_t;
  19.  
  20. /*
  21.  * we can't use 'sizeof(lpcparams_t)' because some compilers
  22.  * add random padding so define size of record that goes over net.
  23.  */
  24. #define LPCRECSIZE 14
  25.  
  26. typedef struct {
  27.     double Oldper, OldG, Oldk[LPC_FILTORDER + 1], bp[LPC_FILTORDER + 1];
  28.     int pitchctr;
  29. } lpcstate_t;
  30.  
  31. int lpc_start(/*void*/);
  32. void lpc_init(/*lpcstate_t* state*/);
  33. void lpc_analyze(/*const unsigned char *buf, lpcparams_t *params*/);
  34. void lpc_synthesize(/*unsigned char *buf, lpcparams_t *params, lpcstate_t* state*/);
  35. void lpc_end(/*void*/);
  36.